package cn.wit.job.service.impl;

import cn.wit.job.condition.RecruitInfoHistoryInfoCondition;
import cn.wit.job.mapper.RecruitInfoHistoryInfoMapper;
import cn.wit.utils.pojo.RecruitInfoDataAnalyze;
import cn.wit.utils.pojo.RecruitInfoHistoryInfo;
import cn.wit.job.service.RecruitInfoHistoryInfoService;
import cn.wit.utils.response.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class RecruitInfoHistoryInfoServiceImpl implements RecruitInfoHistoryInfoService {
    @Autowired
    private RecruitInfoHistoryInfoMapper recruitInfoHistoryInfoMapper;


    @Override
    public Result getRecruitInfoHistoryInfo() {
        List<RecruitInfoDataAnalyze> recruitInfoHistoryInfo = recruitInfoHistoryInfoMapper.getRecruitInfoHistoryInfo();
        if (CollectionUtils.isEmpty(recruitInfoHistoryInfo)) {
            return Result.ok(new ArrayList<>());
        }
        return Result.ok(recruitInfoHistoryInfo);
    }
}
